package locations.actions;

import java.util.ArrayList;
import java.util.List;
import com.opensymphony.xwork2.ActionSupport;
import locations.dao.implement.PracticeTypeDAOHibernateJPA;
import locations.model.TipoPractica;

public class PracticeTypeIndexAction extends ActionSupport
{
	private String pageTitle = "Listado de tipos de practica";
	private List<TipoPractica> practiceTypes = new ArrayList();
	
	public String execute() throws Exception
        {
		PracticeTypeDAOHibernateJPA dao = new PracticeTypeDAOHibernateJPA();
		this.setPracticeTypes(dao.retrieveAll());
		return SUCCESS;
	}

	public String getPageTitle()
        {
		return pageTitle;
	}

	public void setPageTitle(String pageTitle)
        {
		this.pageTitle = pageTitle;
	}

	public List<TipoPractica> getPracticeTypes()
        {
		return practiceTypes;
	}

	public void setPracticeTypes(List<TipoPractica> practiceTypes)
        {
		this.practiceTypes = practiceTypes;
	}


	
	
	
}
